package com.example.demo.controller;


import com.example.demo.entity.User;

import com.example.demo.service.UserSevice;

//import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
public class UserController {

    @Autowired
    UserSevice userSevice;

    @GetMapping("/user")
    public List<User> getUsers(){
        return userSevice.selectAllUser();
    }

}
